<?php

function LibAutoloader($class_name){
  if(is_readable(dirname(__FILE__)."/".$class_name.".php")) {
    require_once(dirname(__FILE__)."/".$class_name.".php");
  } elseif(is_readable(dirname(__FILE__)."/".$class_name."/".$class_name.".php")) {
    require_once(dirname(__FILE__)."/".$class_name."/".$class_name.".php");
  } elseif(is_readable(dirname(__FILE__)."/model/".$class_name.".php")) {
    require_once(dirname(__FILE__)."/model/".$class_name.".php");
  } else return false;
}

spl_autoload_register('LibAutoloader');